<?php
namespace Common\Models;
use Common\BaseModel;
class  AdPosition extends BaseModel
{
    public $res;
    public $expire;

    public function initialize()
    {
        parent::initialize();
        $this->setSource('f_ad_positions');
    }

    public function home_tan_ad(){
        $condition = "key='home'";
        $res=$this->findFirst(
            array(
                $condition,
                'order'=>'id desc',
            )
        );
        return $res;
    }

}
